package me.alex.databindingdemo;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;

/**
 * ================================================
 * Description:
 * <p>
 * Created by Alex on 2020/12/13
 * <p>
 * 页面内容介绍:
 * <p>
 * ================================================
 */
public abstract class BaseDataBindActivity<T extends ViewDataBinding> extends AppCompatActivity {

    public T bind;
    private int layoutId;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(setLayout());
        bind = DataBindingUtil.setContentView(this, setLayout());
    }

    public abstract int setLayout();

}
